package com.droowa.domain;

import java.sql.Date;

public class BoardReply {
	int rpNum;
	int paperNum;
	String writer;
	String body;
	int parentNum;
	int secret;
	Date writeDate;
	
	public BoardReply() {
		super();
	}

	public BoardReply(int rpNum, int paperNum, String writer, String body,
			int parentNum, int secret, Date writeDate) {
		super();
		this.rpNum = rpNum;
		this.paperNum = paperNum;
		this.writer = writer;
		this.body = body;
		this.parentNum = parentNum;
		this.secret = secret;
		this.writeDate = writeDate;
	}

	public int getRpNum() {
		return rpNum;
	}

	public void setRpNum(int rpNum) {
		this.rpNum = rpNum;
	}

	public int getPaperNum() {
		return paperNum;
	}

	public void setPaperNum(int paperNum) {
		this.paperNum = paperNum;
	}

	public String getWriter() {
		return writer;
	}

	public void setWriter(String writer) {
		this.writer = writer;
	}

	public String getBody() {
		return body;
	}

	public void setBody(String body) {
		this.body = body;
	}

	public int getParentNum() {
		return parentNum;
	}

	public void setParentNum(int parentNum) {
		this.parentNum = parentNum;
	}

	public int getSecret() {
		return secret;
	}

	public void setSecret(int secret) {
		this.secret = secret;
	}

	public Date getWriteDate() {
		return writeDate;
	}

	public void setWriteDate(Date writeDate) {
		this.writeDate = writeDate;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((body == null) ? 0 : body.hashCode());
		result = prime * result + paperNum;
		result = prime * result + parentNum;
		result = prime * result + rpNum;
		result = prime * result + secret;
		result = prime * result
				+ ((writeDate == null) ? 0 : writeDate.hashCode());
		result = prime * result + ((writer == null) ? 0 : writer.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		BoardReply other = (BoardReply) obj;
		if (body == null) {
			if (other.body != null)
				return false;
		} else if (!body.equals(other.body))
			return false;
		if (paperNum != other.paperNum)
			return false;
		if (parentNum != other.parentNum)
			return false;
		if (rpNum != other.rpNum)
			return false;
		if (secret != other.secret)
			return false;
		if (writeDate == null) {
			if (other.writeDate != null)
				return false;
		} else if (!writeDate.equals(other.writeDate))
			return false;
		if (writer == null) {
			if (other.writer != null)
				return false;
		} else if (!writer.equals(other.writer))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "BoardReply [rpNum=" + rpNum + ", paperNum=" + paperNum
				+ ", writer=" + writer + ", body=" + body + ", parentNum="
				+ parentNum + ", secret=" + secret + ", writeDate=" + writeDate
				+ "]";
	}
	
}
